package org.example.myleet.p902;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(2476 == solution.atMostNGivenDigitSet(new String[]{"1","2","3","4","6","7","8","9"}, 4764));
        Assert.isTrue(18 == solution.atMostNGivenDigitSet(new String[]{"3","4","5","6"}, 64));
        Assert.isTrue(1 == solution.atMostNGivenDigitSet(new String[]{"7"}, 8));
        Assert.isTrue(20 == solution.atMostNGivenDigitSet(new String[]{"1","3","5","7"}, 100));
        Assert.isTrue(27 == solution.atMostNGivenDigitSet(new String[]{"1","4","7"}, 450));
        Assert.isTrue(29523 == solution.atMostNGivenDigitSet(new String[]{"1","4","9"}, 1000000000));
        Assert.isTrue(349754607 == solution.atMostNGivenDigitSet(new String[]{"1","2","3","4","5","6","7","8","9"}, 807903069));
    }
}
